package cn.fl.audit.service.impl;

import cmm.comm.facade.framework.api.ISysDictionaryApiService;
import cmm.comm.facade.framework.dto.SysDictionaryDTO;
import cmm.mid.core.framework.page.KeyValueVO;
import cmm.mid.core.framework.page.Pager;
import cn.cmm.base.framework.constant.BaseConstant;
import cn.cmm.base.framework.exception.BaseException;
import cn.cmm.base.framework.utils.BaseLogUtils;
import cn.cmm.base.framework.utils.CollectionUtils;
import cn.cmm.base.framework.utils.DecimalUtils;
import cn.cmm.base.framework.utils.StringUtils;
import cn.fl.audit.condition.AudPayPassOpinionQueryCondition;
import cn.fl.audit.constant.AudStandingBookConstant;
import cn.fl.audit.dto.AudPayPassOpinionDTO;
import cn.fl.audit.service.IAudPayPassOpinionService;
import cn.fl.audit.service.IAuditApiService;
import cn.fl.audit.transform.AudPayPassOpinionVOTransform;
import cn.fl.audit.vo.AudPayPassOpinionVO;
import cn.fl.capital.constant.CapPayInfoConstant;
import cn.fl.capital.service.ICapPayInfoService;
import cn.fl.capital.vo.CapPayInfoVO;
import cn.fl.framework.base.context.CurrentThreadContext;
import cn.fl.framework.constant.DictionaryConstant;
import cn.fl.preloan.IAuditPayPassOpinionService;
import cn.fl.preloan.condition.AuditPayPassOpQueryCondition;
import cn.fl.preloan.dto.audit.AudPayPassOpListRequest;
import cn.fl.preloan.dto.audit.AuditPayPassOpinionDTO;
import cn.fl.project.constant.PrjBscInfoConstant;
import cn.fl.project.service.IPrjBscInfoService;
import cn.fl.project.service.IPrjPrdBscInfoService;
import cn.fl.project.vo.PrjBscInfoVO;
import cn.fl.project.vo.PrjPrdBscInfoVO;
import com.alibaba.fastjson.JSON;
import cn.fl.commons.result.ResponseData;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @Description: 放款通过意见表 客户端服务层接口实现
 * @Description: 业务层方法名称前缀：新增：add* 删除：remove* 修改：modify* 查询对象：select* get* 批量：batch* 查询集合：search*
 */
@Service
public class AudPayPassOpinionServiceImpl implements IAudPayPassOpinionService {

	/**
	 * 日志
	 */
	private static final Logger logger = LoggerFactory.getLogger(AudPayPassOpinionServiceImpl.class);
	
	/**
	 * 
	 */
	@Autowired
	private IAuditApiService auditApiService;
	/**
     * 数据字典服务
     */
    @Autowired
    private ISysDictionaryApiService sysDictionaryApiService;
    
    /**
     * 项目信息服务
     */
    @Autowired
    private IPrjBscInfoService prjBscInfoService;
    
    /**
     * 付款信息服务
     */
    @Autowired
    private ICapPayInfoService capPayInfoService;
    
    @Autowired
    private IPrjPrdBscInfoService prjPrdBscInfoService;

    @Autowired
	private IAuditPayPassOpinionService auditPayPassOpinionService;

	@Override
	public AudPayPassOpinionVO selectById(Long id) throws BaseException{
		if(StringUtils.isEmpty(id)){
			BaseLogUtils.info(logger, "selectById", "主键参数不能为空!", CurrentThreadContext.getCurrentUserName());
			return null;
		}
		//TODO 业务逻辑
		AudPayPassOpinionDTO dto = null;//this.自定义ApiService.selectById(id);
		return AudPayPassOpinionVOTransform.toVO(dto);
	}

	@Override
	public Long add(AudPayPassOpinionVO entity) throws BaseException{
		if(null == entity){
			BaseLogUtils.info(logger, "add", "新增对象不能为空!", CurrentThreadContext.getCurrentUserName());
			return null;
		}
		return this.auditApiService.addAudPayPassOpinion(AudPayPassOpinionVOTransform.toDTO(entity));
	}

	@Override
	public boolean removeById(Long id) throws BaseException{
		if(StringUtils.isEmpty(id)){
			BaseLogUtils.info(logger, "removeById", "删除主键参数不能为空!", CurrentThreadContext.getCurrentUserName());
			return false;
		}
		//return this.audPayPassOpinionApiService.removeById(id);
		//TODO 业务逻辑
		return false;
	}
	
	/**
     * 删除
     * @param ids
     * @return
     */
    public boolean removeByIds(List<Long> ids)throws BaseException{
    	if(CollectionUtils.isEmpty(ids)){
    		BaseLogUtils.info(logger, "removeByIds", "删除主键参数集合不能为空!", CurrentThreadContext.getCurrentUserName());
			return false;
		};
		return false;
    }

	@Override
	public boolean modify(AudPayPassOpinionVO entity) throws BaseException{
		if(null == entity){
			BaseLogUtils.info(logger, "modify", "修改对象参数不能为空!", CurrentThreadContext.getCurrentUserName());
			return false;
		}
		return this.auditApiService.modifyAudPayPassOpinion(AudPayPassOpinionVOTransform.toDTO(entity));
	}

	@Override
	public Pager searchListPage(Pager page) throws BaseException{
		if(null == page)page = new Pager();
		//return this.audPayPassOpinionApiService.searchListPage(page);
		//TODO 业务逻辑
		return null;
	}
	
	
	@Override
	public List<AudPayPassOpinionVO> searchList(
			AudPayPassOpinionQueryCondition qc) throws BaseException {
		if(null==qc) qc = new AudPayPassOpinionQueryCondition();
		List<AudPayPassOpinionDTO> DTOList = this.auditApiService.searchAudPayPassOpinionList(qc);
		List<AudPayPassOpinionVO> VOList = AudPayPassOpinionVOTransform.toVOList(DTOList);
		if(CollectionUtils.isNotEmpty(VOList)){
			for (AudPayPassOpinionVO audPayPassOpinionVO : VOList) {
				if(null!=audPayPassOpinionVO.getPayAmt()){
					audPayPassOpinionVO.setPayAmtDouble(DecimalUtils.convertFenToYuan(audPayPassOpinionVO.getPayAmt()));
				}
				if(null!=audPayPassOpinionVO.getIncomeAmt()){
					audPayPassOpinionVO.setIncomeAmtDouble(DecimalUtils.convertFenToYuan(audPayPassOpinionVO.getIncomeAmt()));
				}
			}
		}
		return VOList;
	}

	@Override
	public List<KeyValueVO> searchYesOrNOList() throws BaseException {
		return this.getKvList(DictionaryConstant.CODE_SYS_YES_NO_CD);
	}
	
	@Override
	public List<KeyValueVO> searchMortgageCdList() throws BaseException {
		return this.getKvList(DictionaryConstant.CODE_AUD_MORTGAGE_CD);
	}
	
	//*****************************私有*************************************
	/**
	 * 根据字典中代码组值获取组员集合
	 * @param grpCd 代码组值
	 * @return 集合
	 */
	private List<KeyValueVO> getKvList(String grpCd){
		List<KeyValueVO> kvList = new ArrayList<>();
		try {
			List<SysDictionaryDTO> sysDictionaryDTOList = this.sysDictionaryApiService.searchGroup(CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd(), grpCd);
			if(CollectionUtils.isNotEmpty(sysDictionaryDTOList)){
				for (SysDictionaryDTO sysDictionaryDTO : sysDictionaryDTOList) {
					KeyValueVO keyValueVO = new KeyValueVO();
					keyValueVO.setKey(sysDictionaryDTO.getCode());
					keyValueVO.setValue(sysDictionaryDTO.getCodeNm());
					kvList.add(keyValueVO);
				}
			}
		} catch (BaseException e) {
			BaseLogUtils.info(logger, "getKvList", "获取字典项组"+grpCd+"失败.ERROR:"+e.getMessage(), CurrentThreadContext.getCurrentUserName());
		} catch (Exception e) {
			BaseLogUtils.error(logger, "getKvList", "获取字典项组"+grpCd+"失败,系统错误.ERROR:"+e.getMessage(), CurrentThreadContext.getCurrentUserName());
		}
		return kvList;
	}

	@Override
	public String getPreviewStringForDy(Long id) throws BaseException {
		if(StringUtils.isEmpty(id))return "";
		StringBuffer previewString = new StringBuffer();
		AuditPayPassOpQueryCondition payOpnQC = new AuditPayPassOpQueryCondition();
		payOpnQC.setOpnTypCd(AudStandingBookConstant.AUD_PAY_OPN_TYP_CD_MORTGAGE);
		payOpnQC.setId(id);
		AudPayPassOpListRequest searchRequest = new AudPayPassOpListRequest(payOpnQC);
		BaseLogUtils.info(logger, "getPreviewStringForDy", "searchAudPayPassOpinionList START:"+ JSON.toJSONString(searchRequest), CurrentThreadContext.getCurrentUserName());
		ResponseData<List<AuditPayPassOpinionDTO>> responseData = auditPayPassOpinionService.searchAudPayPassOpinionList(searchRequest);
		BaseLogUtils.info(logger, "getPreviewStringForDy", "searchAudPayPassOpinionList END:"+ JSON.toJSONString(responseData), CurrentThreadContext.getCurrentUserName());
		List<AuditPayPassOpinionDTO> payPassOpinionList = null;
		if (responseData != null && ResponseData.SUCCESS_CODE.equals(responseData.getCode()) && responseData.getData() != null) {
			payPassOpinionList = responseData.getData();
		}
		String prjTypCd = "";
		AuditPayPassOpinionDTO payOpn = null;
		if(CollectionUtils.isNotEmpty(payPassOpinionList)){
			payOpn = payPassOpinionList.get(0);
			Long capPayId = payOpn.getPayId();
			if(null!=capPayId){
				CapPayInfoVO capPayInfoVO = this.capPayInfoService.selectById(capPayId);
				if(null!=capPayInfoVO){
					Long prjId = capPayInfoVO.getPrjId();
					if(null!=prjId){
						PrjBscInfoVO prjBscInfoVO = this.prjBscInfoService.selectById(prjId);
						if(null!=prjBscInfoVO){
							prjTypCd = prjBscInfoVO.getPrjTypCd();//项目类型
						}
					}
				}
			}
		}
		/**判断项目类型*/
		if(StringUtils.isNotEmpty(prjTypCd) && null!=payOpn){
			previewString.append("该设备");
			if(prjTypCd.equals(PrjBscInfoConstant.PRJ_TYP_CD_GKYW) || prjTypCd.equals(PrjBscInfoConstant.PRJ_TYP_CD_YSYW)){	//云商or挂靠
				if(Integer.valueOf(BaseConstant.IS_YESNO_YES).equals(payOpn.getIsMortgage())){	//办理抵押
					previewString.append("已抵押");
				}else{	//未办理抵押
					previewString.append("挂靠");
				}
			}else{	//除云商/挂靠
				if(Integer.valueOf(BaseConstant.IS_YESNO_YES).equals(payOpn.getIsMortgage())){	//办理抵押
					previewString.append("已抵押");
				}else{	//未办理抵押
					if(AudStandingBookConstant.AUD_MORTGAGE_CD_OUR_COMPANY.equals(payOpn.getMortgageCd())){	//挂靠于我司
						previewString.append("挂靠");
					}else{	//挂靠于第三方
						previewString.append("未抵押");
					}
				}
			}
			previewString.append("与我司，交车照片");
			if(Integer.valueOf(BaseConstant.IS_YESNO_YES).equals(payOpn.getIsHavePhoto())){//有交车照片
				previewString.append("、");
			}else{//无交车照片
				previewString.append("不合规，");
			}
			previewString.append("登记证书、大驾号照片已上传。</br>");
			if(StringUtils.isNotEmpty(payOpn.getRemark())){
				previewString.append("备注:"+payOpn.getRemark());
			}
		}
		return previewString.toString();
	}

	@Override
	public String getPreviewStringForHt(Long id) throws BaseException {
		if(StringUtils.isEmpty(id))return "";
		StringBuffer previewString = new StringBuffer();
		try {
			AuditPayPassOpQueryCondition payOpnQC = new AuditPayPassOpQueryCondition();
			payOpnQC.setOpnTypCd(AudStandingBookConstant.AUD_PAY_OPN_TYP_CD_CONTRACT);
			payOpnQC.setId(id);
			AudPayPassOpListRequest searchRequest = new AudPayPassOpListRequest(payOpnQC);
			BaseLogUtils.info(logger, "getPreviewStringForHt", "searchAudPayPassOpinionList START:"+ JSON.toJSONString(searchRequest), CurrentThreadContext.getCurrentUserName());
			ResponseData<List<AuditPayPassOpinionDTO>> responseData = auditPayPassOpinionService.searchAudPayPassOpinionList(searchRequest);
			BaseLogUtils.info(logger, "getPreviewStringForHt", "searchAudPayPassOpinionList END:"+ JSON.toJSONString(responseData), CurrentThreadContext.getCurrentUserName());
			List<AuditPayPassOpinionDTO> payPassOpinionList = null;
			if (responseData != null && ResponseData.SUCCESS_CODE.equals(responseData.getCode()) && responseData.getData() != null) {
				payPassOpinionList = responseData.getData();
			}
			AuditPayPassOpinionDTO payOpn = null;
			CapPayInfoVO capPayInfoVO = null;
			PrjBscInfoVO prjBscInfoVO = null;
			if(CollectionUtils.isNotEmpty(payPassOpinionList)){
				payOpn = payPassOpinionList.get(0);
				Long capPayId = payOpn.getPayId();
				if(null!=capPayId){
					capPayInfoVO = this.capPayInfoService.selectById(capPayId);
					if(null!=capPayInfoVO){
						Long prjId = capPayInfoVO.getPrjId();
						if(null!=prjId){
							prjBscInfoVO = this.prjBscInfoService.selectById(prjId);
						}
					}
				}
			}
			if(null!=payOpn && null!=capPayInfoVO && null!=prjBscInfoVO){
				//2018-7-23 by yaoxiurong 对于重卡和优车事业部的放款合同意见有调整
				if((PrjBscInfoConstant.CODE_BU_ORG_CD_ZK.equals(prjBscInfoVO.getBuOrgCd()))){
					//重卡事业部
					previewString.append("1、该业务为"+prjBscInfoVO.getPrjTypCdNm()+capPayInfoVO.getPayTypCdNm());
					if(Integer.valueOf(BaseConstant.IS_YESNO_YES).equals(payOpn.getIsAnchored())){	//是否挂靠-是
						previewString.append("，车辆挂靠；");
					}else{
						previewString.append("，上个人户；");
					}
					previewString.append("</br>2、该设备为"+prjBscInfoVO.getBizTypCdNm()+"，合同签署方式");
					if(PrjBscInfoConstant.CODE_PRJ_CNT_TYP_CD_ELC.equals(prjBscInfoVO.getCntTypCd())){
						previewString.append("电子，委托付款及车辆管理协议、");
					}else{
						previewString.append("纸质，所有权转让协议、");
					}
					previewString.append("融租租赁合同、");
					if(Integer.valueOf(BaseConstant.IS_YESNO_YES).equals(payOpn.getIsAnchored())){	//是否挂靠-是
						previewString.append("协议书（用于发票变更）、");
					}
					previewString.append("交车验收单齐全；");
					
					previewString.append("</br>3、保单已上传，");
					if(Integer.valueOf(BaseConstant.IS_YESNO_YES).equals(payOpn.getIsFullInsurance())){
						previewString.append("保险购买金额足额，");
					}else{
						previewString.append("保险购买金额不足额，");
					}
					if(Integer.valueOf(BaseConstant.IS_YESNO_YES).equals(payOpn.getIsComplianceBeneficiary())){
						previewString.append("第一受益人符合我司要求，");
					}else{
						previewString.append("第一受益人不符合我司要求，");
					}
					if(Integer.valueOf(BaseConstant.IS_YESNO_YES).equals(payOpn.getIsCompleteInsurance())){
						previewString.append("险种齐全；");
					}else{
						previewString.append("险种不齐全；");
					}
					previewString.append("</br>4、征信授权书、债权转让通知书已签署合规；");
					previewString.append("</br>5、合格证、发票、车架号、车钥匙、已上传。");
					
				}else if((PrjBscInfoConstant.CODE_BU_ORG_CD_YC.equals(prjBscInfoVO.getBuOrgCd()))){
					//优车事业部
					previewString.append("1、该业务为"+prjBscInfoVO.getPrjTypCdNm()+capPayInfoVO.getPayTypCdNm());
					if(Integer.valueOf(BaseConstant.IS_YESNO_YES).equals(payOpn.getIsAnchored())){	//是否挂靠-是
						previewString.append("，车辆挂靠；");
					}else{
						previewString.append("，上个人户；");
					}
					previewString.append("</br>2、该设备为"+prjBscInfoVO.getBizTypCdNm()+"，所有权转让协议、托底回购协议、交车验收单、债权转让通知书齐全；");
					
					previewString.append("</br>3、保单已上传，");
					if(Integer.valueOf(BaseConstant.IS_YESNO_YES).equals(payOpn.getIsFullInsurance())){
						previewString.append("保险购买金额足额，");
					}else{
						previewString.append("保险购买金额不足额，");
					}
					if(Integer.valueOf(BaseConstant.IS_YESNO_YES).equals(payOpn.getIsComplianceBeneficiary())){
						previewString.append("第一受益人符合我司要求，");
					}else{
						previewString.append("第一受益人不符合我司要求，");
					}
					if(Integer.valueOf(BaseConstant.IS_YESNO_YES).equals(payOpn.getIsCompleteInsurance())){
						previewString.append("险种齐全；");
					}else{
						previewString.append("险种不齐全；");
					}
					previewString.append("</br>4、登记证书、发票、车钥匙、车架号已上传。");
					
				}else{
					/**专车业务直接返回备注信息*/
					if(PrjBscInfoConstant.PRJ_TYP_CD_ZCSYB.equals(prjBscInfoVO.getPrjTypCd())){	/**专车业务*/
						previewString.append(payOpn.getRemark());
						return previewString.toString();
					}
					
					previewString.append("1、该业务为"+prjBscInfoVO.getPrjTypCdNm()+"；</br>");
					previewString.append("2、该设备为"+prjBscInfoVO.getBizTypCdNm());
					/**根据  项目类型|业务模式|是否挂靠|是否过户   生成预览*/
					if(PrjBscInfoConstant.PRJ_TYP_CD_YSYW.equals(prjBscInfoVO.getPrjTypCd())){	/**云商业务*/
						if(PrjBscInfoConstant.PRJ_BIZ_TYP_CD_ZZ.equals(prjBscInfoVO.getBizTypCd())){	//直接租赁
							previewString.append("，买卖合同、分期付款买卖合同齐全");
						}else if(PrjBscInfoConstant.PRJ_BIZ_TYP_CD_XSHZ.equals(prjBscInfoVO.getBizTypCd())){	//形式售后回租
							previewString.append("，买卖合同、分期付款买卖合同、三方协议、过户版协议书齐全");
						}else if(PrjBscInfoConstant.PRJ_BIZ_TYP_CD_BZHZ.equals(prjBscInfoVO.getBizTypCd())){	//标准售后回租
							previewString.append("，分期付款买卖合同齐全");
						}
					}else if(PrjBscInfoConstant.PRJ_TYP_CD_GKYW.equals(prjBscInfoVO.getPrjTypCd())){	/**挂靠业务*/
						if(PrjBscInfoConstant.PRJ_BIZ_TYP_CD_ZZ.equals(prjBscInfoVO.getBizTypCd())){	//直接租赁
							previewString.append("，买卖合同、融资租赁合同、协议书齐全");
						}else if(PrjBscInfoConstant.PRJ_BIZ_TYP_CD_XSHZ.equals(prjBscInfoVO.getBizTypCd())){	//形式售后回租
							previewString.append("，买卖合同、融资租赁合同、三方协议、协议书、过户版协议书齐全");
						}else if(PrjBscInfoConstant.PRJ_BIZ_TYP_CD_BZHZ.equals(prjBscInfoVO.getBizTypCd())){	//标准售后回租
							previewString.append("，融资租赁合同、协议书齐全");
						}
					}else{	/**非云商挂靠*/
						if(PrjBscInfoConstant.PRJ_BIZ_TYP_CD_ZZ.equals(prjBscInfoVO.getBizTypCd())){	//直接租赁
							if(Integer.valueOf(BaseConstant.IS_YESNO_YES).equals(payOpn.getIsAnchored())){	//是否挂靠-是
								previewString.append("，买卖合同、融资租赁合同、协议书齐全");
							}else{
								previewString.append("，买卖合同、融资租赁合同齐全");
							}
						}else if(PrjBscInfoConstant.PRJ_BIZ_TYP_CD_XSHZ.equals(prjBscInfoVO.getBizTypCd())){	//形式售后回租
							if(Integer.valueOf(BaseConstant.IS_YESNO_YES).equals(payOpn.getIsAnchored())){	//是否挂靠-是
								previewString.append("，买卖合同、融资租赁合同、三方协议、协议书");
							}else{
								previewString.append("，买卖合同、融资租赁合同、三方协议");
							}
							if(Integer.valueOf(BaseConstant.IS_YESNO_YES).equals(payOpn.getIsTransfer())){	//是否过户-是
								previewString.append("、过户版协议书齐全");
							}else{
								previewString.append("齐全");
							}
						}else if(PrjBscInfoConstant.PRJ_BIZ_TYP_CD_BZHZ.equals(prjBscInfoVO.getBizTypCd())){	//标准售后回租
							if(Integer.valueOf(BaseConstant.IS_YESNO_YES).equals(payOpn.getIsAnchored())){	//是否挂靠-是
								previewString.append("，融资租赁合同、协议书");
							}else{
								previewString.append("，融资租赁合同");
							}
							if(Integer.valueOf(BaseConstant.IS_YESNO_YES).equals(payOpn.getIsTransfer())){	//是否过户-是
								previewString.append("、过户版协议书齐全");
							}else{
								previewString.append("齐全");
							}
						}
					}
					previewString.append("；</br>");
					//=============================================================================================
					if(Integer.valueOf(BaseConstant.IS_YESNO_YES).equals(payOpn.getIsFullInsurance())){
						previewString.append("3、保险购买金额足额，");
					}else{
						previewString.append("3、保险购买金额不足额，");
					}
					if(Integer.valueOf(BaseConstant.IS_YESNO_YES).equals(payOpn.getIsComplianceBeneficiary())){
						previewString.append("第一受益人符合我司要求，");
					}else{
						previewString.append("第一受益人不符合我司要求，");
					}
					if(Integer.valueOf(BaseConstant.IS_YESNO_YES).equals(payOpn.getIsCompleteInsurance())){
						previewString.append("险种齐全；");
					}else{
						previewString.append("险种不齐全；");
					}
					previewString.append("</br>");
					//===============================================================================================
					previewString.append("4、该业务为"+capPayInfoVO.getPayTypCdNm()+"流程，");
					if(Integer.valueOf(BaseConstant.IS_YESNO_YES).equals(payOpn.getIsAnchored())){
						previewString.append("车辆挂靠；");
					}else{
						previewString.append("车辆不挂靠；");
					}
					previewString.append("</br>");
					//===============================================================================================
					if(PrjBscInfoConstant.PRJ_TYP_CD_YSYW.equals(prjBscInfoVO.getPrjTypCd())){	/**云商业务*/
						previewString.append("5、调查报告签字页、债权转让通知书签署合规；</br>6、");
					}else{
						previewString.append("5、");
					}
					//===============================================================================================
					if(PrjBscInfoConstant.PRJ_TYP_CD_YSYW.equals(prjBscInfoVO.getPrjTypCd())){	/**云商业务*/
						if(PrjBscInfoConstant.PRJ_BIZ_TYP_CD_ZZ.equals(prjBscInfoVO.getBizTypCd())){	//直接租赁
							previewString.append("交车验收单、合格证已上传。");
						}else if(PrjBscInfoConstant.PRJ_BIZ_TYP_CD_XSHZ.equals(prjBscInfoVO.getBizTypCd())){	//形式售后回租
							previewString.append("交车验收单、合格证已上传。");
						}else if(PrjBscInfoConstant.PRJ_BIZ_TYP_CD_BZHZ.equals(prjBscInfoVO.getBizTypCd())){	//标准售后回租
							previewString.append("交车验收单已上传。");
						}
					}else if(PrjBscInfoConstant.PRJ_TYP_CD_GKYW.equals(prjBscInfoVO.getPrjTypCd())){	/**挂靠业务*/
						if(PrjBscInfoConstant.PRJ_BIZ_TYP_CD_ZZ.equals(prjBscInfoVO.getBizTypCd())){	//直接租赁
							previewString.append("车钥匙、合格证已上传。");
						}else if(PrjBscInfoConstant.PRJ_BIZ_TYP_CD_XSHZ.equals(prjBscInfoVO.getBizTypCd())){	//形式售后回租
							previewString.append("车钥匙、合格证已上传。");
						}else if(PrjBscInfoConstant.PRJ_BIZ_TYP_CD_BZHZ.equals(prjBscInfoVO.getBizTypCd())){	//标准售后回租
							previewString.append("车钥匙已上传。");
						}
					}else{	/**非云商挂靠*/
						if(PrjBscInfoConstant.PRJ_BIZ_TYP_CD_ZZ.equals(prjBscInfoVO.getBizTypCd())){	//直接租赁
							previewString.append("交车验收单、车钥匙、合格证已上传。");
						}else if(PrjBscInfoConstant.PRJ_BIZ_TYP_CD_XSHZ.equals(prjBscInfoVO.getBizTypCd())){	//形式售后回租
							previewString.append("交车验收单、车钥匙、合格证已上传。");
						}else if(PrjBscInfoConstant.PRJ_BIZ_TYP_CD_BZHZ.equals(prjBscInfoVO.getBizTypCd())){	//标准售后回租
							previewString.append("车钥匙已上传。");
						}
					}
					if(StringUtils.isNotEmpty(payOpn.getRemark())){
						previewString.append("<br/>备注:"+payOpn.getRemark());
					}
				}
			}
		} catch (Exception e) {
			BaseLogUtils.info(logger, "getPreviewStringForHt", "=预览放款意见异常=id:"+id, CurrentThreadContext.getCurrentUserName());
			e.printStackTrace();
		}
		return previewString.toString();
	}

	@Override
	public String getPreviewStringForHtForCar(Long id) throws BaseException {
		if(StringUtils.isEmpty(id))return "";
		StringBuffer previewString = new StringBuffer();
		AuditPayPassOpQueryCondition payOpnQC = new AuditPayPassOpQueryCondition();
		payOpnQC.setOpnTypCd(AudStandingBookConstant.AUD_PAY_OPN_TYP_CD_CONTRACT);
		payOpnQC.setId(id);
		CapPayInfoVO capPayInfoVO = null;

		AudPayPassOpListRequest searchRequest = new AudPayPassOpListRequest(payOpnQC);
		BaseLogUtils.info(logger, "getPreviewStringForHtForCar", "searchAudPayPassOpinionList START:"+ JSON.toJSONString(searchRequest), CurrentThreadContext.getCurrentUserName());
		ResponseData<List<AuditPayPassOpinionDTO>> responseData = auditPayPassOpinionService.searchAudPayPassOpinionList(searchRequest);
		BaseLogUtils.info(logger, "getPreviewStringForHtForCar", "searchAudPayPassOpinionList END:"+ JSON.toJSONString(responseData), CurrentThreadContext.getCurrentUserName());
		List<AuditPayPassOpinionDTO> payPassOpinionList = null;
		if (responseData != null && ResponseData.SUCCESS_CODE.equals(responseData.getCode()) && responseData.getData() != null) {
			payPassOpinionList = responseData.getData();
		}
		if(CollectionUtils.isNotEmpty(payPassOpinionList)){
			AuditPayPassOpinionDTO payOpn = payPassOpinionList.get(0);
			Long capPayId = payOpn.getPayId();
			if(null!=capPayId){
				capPayInfoVO = this.capPayInfoService.selectById(capPayId);
			}
			Integer isNewPrd = null;
			PrjPrdBscInfoVO prjPrdBscInfoVO = null;
			if(null!=capPayInfoVO){
				Long prjPrdId = capPayInfoVO.getPrjPrdId();
				prjPrdBscInfoVO = this.prjPrdBscInfoService.selectById(prjPrdId);
			}
			if(null!=prjPrdBscInfoVO){
				isNewPrd = prjPrdBscInfoVO.getIsNew();
			}
			if(null!=payOpn && null!=capPayInfoVO){
				String payTypCd = capPayInfoVO.getPayTypCd();
				int count = 1;
				if(CapPayInfoConstant.CODE_PAY_TYP_CD_1.equals(payTypCd)){//正常放款
					previewString.append("</br>"+count+"、融资租赁合同、买卖合同齐全；");count++;
				}
				previewString.append("</br>"+count+"、债权转让通知书、租赁物件签收单签署合规；");count++;
				if(null!=isNewPrd && BaseConstant.IS_YESNO_YES==isNewPrd){/**新车(只有金额两个字段)*/
					if(CapPayInfoConstant.CODE_PAY_TYP_CD_1.equals(payTypCd)){//新车:正常放款
						previewString.append("</br>"+count+"、GPS 审核正常；");count++;
					}
					previewString.append("</br>"+count+"、同意本次支付经销商(");count++;
					if(null!=payOpn.getPayAmt()){
						previewString.append(DecimalUtils.convertFenToYuan(payOpn.getPayAmt()));
					}
					previewString.append(")-(");
					if(null!=payOpn.getIncomeAmt()){
						previewString.append(DecimalUtils.convertFenToYuan(payOpn.getIncomeAmt()));
					}
					previewString.append(")=(");
					if(null!=payOpn.getPayAmt() && null!=payOpn.getIncomeAmt()){
						previewString.append(DecimalUtils.sub(DecimalUtils.convertFenToYuan(payOpn.getPayAmt()), DecimalUtils.convertFenToYuan(payOpn.getIncomeAmt())));
					}
					previewString.append(")元。");
				}else if (null!=isNewPrd && BaseConstant.IS_YESNO_NO==isNewPrd){/**二手车(正常放款:全部字段  提前放款:没有两个金额字段)*/
					previewString.append("</br>"+count+"、GPS 审核正常；");count++;
					previewString.append("</br>"+count+"、保险购买金额");count++;
					if(null!=payOpn.getIsFullInsurance() && BaseConstant.IS_YESNO_NO==payOpn.getIsFullInsurance()){
						previewString.append("不");
					}
					previewString.append("足额，第一受益人");
					if(null!=payOpn.getIsComplianceBeneficiary() && BaseConstant.IS_YESNO_NO==payOpn.getIsComplianceBeneficiary()){
						previewString.append("不");
					}
					previewString.append("符合我司要求，险种");
					if(null!=payOpn.getIsCompleteInsurance() && BaseConstant.IS_YESNO_NO==payOpn.getIsCompleteInsurance()){
						previewString.append("不");
					}
					previewString.append("齐全；");
					if(null!=payOpn.getIsMortgage() && BaseConstant.IS_YESNO_YES==payOpn.getIsMortgage()){
						previewString.append("</br>"+count+"、车辆登记证书、大驾号、车钥匙已上传；");count++;
					}
					if(CapPayInfoConstant.CODE_PAY_TYP_CD_1.equals(payTypCd)){//二手车:正常放款
						previewString.append("</br>"+count+"、同意本次支付经销商(");count++;
						if(null!=payOpn.getPayAmt()){
							previewString.append(DecimalUtils.convertFenToYuan(payOpn.getPayAmt()));
						}
						previewString.append(")-(");
						if(null!=payOpn.getIncomeAmt()){
							previewString.append(DecimalUtils.convertFenToYuan(payOpn.getIncomeAmt()));
						}
						previewString.append(")=(");
						if(null!=payOpn.getPayAmt() && null!=payOpn.getIncomeAmt()){
							previewString.append(DecimalUtils.sub(DecimalUtils.convertFenToYuan(payOpn.getPayAmt()), DecimalUtils.convertFenToYuan(payOpn.getIncomeAmt())));
						}
						previewString.append(")元。");
					}
				}
				
			}
		}
		return previewString.toString();
	}

	@Override
	public String getPreviewStringForDyForCar(Long id) throws BaseException {
		if(StringUtils.isEmpty(id))return "";
		StringBuffer previewString = new StringBuffer();
		AuditPayPassOpQueryCondition payOpnQC = new AuditPayPassOpQueryCondition();
		payOpnQC.setOpnTypCd(AudStandingBookConstant.AUD_PAY_OPN_TYP_CD_MORTGAGE);
		payOpnQC.setId(id);
		AudPayPassOpListRequest searchRequest = new AudPayPassOpListRequest(payOpnQC);
		BaseLogUtils.info(logger, "getPreviewStringForDyForCar", "searchAudPayPassOpinionList START:"+ JSON.toJSONString(searchRequest), CurrentThreadContext.getCurrentUserName());
		ResponseData<List<AuditPayPassOpinionDTO>> responseData = auditPayPassOpinionService.searchAudPayPassOpinionList(searchRequest);
		BaseLogUtils.info(logger, "getPreviewStringForDyForCar", "searchAudPayPassOpinionList END:"+ JSON.toJSONString(responseData), CurrentThreadContext.getCurrentUserName());
		List<AuditPayPassOpinionDTO> payPassOpinionList = null;
		if (responseData != null && ResponseData.SUCCESS_CODE.equals(responseData.getCode()) && responseData.getData() != null) {
			payPassOpinionList = responseData.getData();
		}
		if(CollectionUtils.isNotEmpty(payPassOpinionList)){
			AuditPayPassOpinionDTO payOpn = payPassOpinionList.get(0);
			if(null!=payOpn){
				Integer isMortgage = payOpn.getIsMortgage();
				Integer isHavePhoto = payOpn.getIsHavePhoto();
				previewString.append("该设备");
				if(null!=isMortgage){
					if(BaseConstant.IS_YESNO_YES==isMortgage){
						previewString.append("已抵押");
					}else if(BaseConstant.IS_YESNO_NO==isMortgage){
						previewString.append("上户");
					}
				}
				previewString.append("于我司，交车照片");
				if(null!=isHavePhoto){
					if(BaseConstant.IS_YESNO_YES==isHavePhoto){
						previewString.append("、");
					}else if(BaseConstant.IS_YESNO_NO==isHavePhoto){
						previewString.append("不合规，");
					}
				}
				previewString.append("登记证书、大驾号照片已上传。");
				if(StringUtils.isNotEmpty(payOpn.getRemark())){
					previewString.append("</br>备注:（"+payOpn.getRemark()+"）");
				}
			}
		}
		return previewString.toString();
	}

	@Override
	public String getPreviewStringForHtForBus(Long id) throws BaseException {
		if(StringUtils.isEmpty(id))return "";
		StringBuffer previewString = new StringBuffer();
		AuditPayPassOpQueryCondition payOpnQC = new AuditPayPassOpQueryCondition();
		payOpnQC.setOpnTypCd(AudStandingBookConstant.AUD_PAY_OPN_TYP_CD_CONTRACT);
		payOpnQC.setId(id);
		AuditPayPassOpinionDTO payOpn = null;
		CapPayInfoVO capPayInfoVO = null;
		PrjBscInfoVO prjBscInfoVO = null;
		AudPayPassOpListRequest searchRequest = new AudPayPassOpListRequest(payOpnQC);
		BaseLogUtils.info(logger, "getPreviewStringForHtForBus", "searchAudPayPassOpinionList START:"+ JSON.toJSONString(searchRequest), CurrentThreadContext.getCurrentUserName());
		ResponseData<List<AuditPayPassOpinionDTO>> responseData = auditPayPassOpinionService.searchAudPayPassOpinionList(searchRequest);
		BaseLogUtils.info(logger, "getPreviewStringForHtForBus", "searchAudPayPassOpinionList END:"+ JSON.toJSONString(responseData), CurrentThreadContext.getCurrentUserName());
		List<AuditPayPassOpinionDTO> payPassOpinionList = null;
		if (responseData != null && ResponseData.SUCCESS_CODE.equals(responseData.getCode()) && responseData.getData() != null) {
			payPassOpinionList = responseData.getData();
		}
		if(CollectionUtils.isNotEmpty(payPassOpinionList)){
			payOpn = payPassOpinionList.get(0);
			Long capPayId = payOpn.getPayId();
			if(null!=capPayId){
				capPayInfoVO = this.capPayInfoService.selectById(capPayId);
			}
			if(null!=capPayInfoVO){
				Long prjId = capPayInfoVO.getPrjId();
				prjBscInfoVO = this.prjBscInfoService.selectById(prjId);
			}
		}
		if (capPayInfoVO != null) {
			if (capPayInfoVO.getPayTypCd().equals(CapPayInfoConstant.CODE_PAY_TYP_CD_1)) {
				previewString.append("<b>正常放款流程放款合同通过意见</b>");
				previewString.append("</br>1、该业务为");
				if(null!=prjBscInfoVO && StringUtils.isNotEmpty(prjBscInfoVO.getPrjTypCd())){
					Map<String, String> dicGrp = this.sysDictionaryApiService.searchGroupToMapAll(CurrentThreadContext.getCurrentSysCd(), prjBscInfoVO.getBuOrgCd(), DictionaryConstant.CODE_PRJ_TYPE_CD);
					if(null!=dicGrp && dicGrp.containsKey(prjBscInfoVO.getPrjTypCd())){
						previewString.append(dicGrp.get(prjBscInfoVO.getPrjTypCd()));//项目类型
					}
				}
				if(null!=capPayInfoVO && StringUtils.isNotEmpty(capPayInfoVO.getPayTypCd())){
					if(CapPayInfoConstant.CODE_PAY_TYP_CD_1.equals(capPayInfoVO.getPayTypCd())){
						previewString.append("正常放款,");
					}else if(CapPayInfoConstant.CODE_PAY_TYP_CD_2.equals(capPayInfoVO.getPayTypCd())){
						previewString.append("提前放款,");
					}
				}
				if(null!=payOpn && BaseConstant.IS_YESNO_YES==payOpn.getIsAnchored()){
					previewString.append("车辆已挂靠;");
				}else{
					previewString.append("上个人户;");
				}
				previewString.append("</br>2、该设备为");
				if (null != prjBscInfoVO && StringUtils.isNotEmpty(prjBscInfoVO.getBizTypCd())){
					if (PrjBscInfoConstant.PRJ_BIZ_TYP_CD_ZZ.equals(prjBscInfoVO.getBizTypCd())){
						previewString.append("直接租赁业务,");
					}else if (PrjBscInfoConstant.PRJ_BIZ_TYP_CD_BZHZ.equals(prjBscInfoVO.getBizTypCd())){
						previewString.append("标准回租业务,");
					}else if (PrjBscInfoConstant.PRJ_BIZ_TYP_CD_XSHZ.equals(prjBscInfoVO.getBizTypCd())){
						previewString.append("形式回租业务,");
					}else if (PrjBscInfoConstant.PRJ_BIZ_TYP_CD_GHKD.equals(prjBscInfoVO.getBizTypCd())){
						previewString.append("工行卡贷业务,");
					}else if (PrjBscInfoConstant.PRJ_BIZ_TYP_CD_STZZ.equals(prjBscInfoVO.getBizTypCd())){
						previewString.append("视同直租业务,");
					}
				}
				previewString.append("买卖合同、融租租赁合同、三方协议");
				if (null != payOpn && BaseConstant.IS_YESNO_YES == payOpn.getIsAnchored()){
					previewString.append("、协议书、");
				}else{
					previewString.append("、");
				}
				previewString.append("交车验收单齐全;");
				previewString.append("</br>3、征信授权书、债权转让通知书已签署合规；");
				previewString.append("</br>4、合格证、发票已上传。");
				if (null != payOpn && payOpn.getIsUploadIns() == BaseConstant.IS_YESNO_NO){
					previewString.append("</br>5、保单未上传");
				}else if (null != payOpn && BaseConstant.IS_YESNO_YES == payOpn.getIsUploadIns()){
					previewString.append("</br>5、保单已上传,保险购买金额足额,第一受益人符合我司要求,险种齐全");
				}
				previewString.append("</br>6、该设备");
				if (null != payOpn && BaseConstant.IS_YESNO_YES == payOpn.getIsMortgage()){
					previewString.append("已抵押,");
				}else {
					previewString.append("未抵押,");
				}
				previewString.append("登记证书已上传,行驶证、大驾号照片、交车照片、车钥匙合规");
			}else if(capPayInfoVO.getPayTypCd().equals(CapPayInfoConstant.CODE_PAY_TYP_CD_2)
					&& capPayInfoVO.getPayStsCd().equals(CapPayInfoConstant.CODE_PAY_STS_CD_FIN)){
				previewString.append("</br>1.该设备");
				if (null != payOpn && BaseConstant.IS_YESNO_YES == payOpn.getIsMortgage()){
					previewString.append("已抵押,");
				}else {
					previewString.append("未抵押,");
				}
				previewString.append("登记证书已上传,行驶证、大驾号照片、交车照片、车钥匙合规");
				if (null != payOpn && payOpn.getIsUploadIns() == BaseConstant.IS_YESNO_NO){
					previewString.append("</br>2.保单未上传");
				}else if (null != payOpn && BaseConstant.IS_YESNO_YES == payOpn.getIsUploadIns()){
					previewString.append("</br>2、保单已上传,保险购买金额足额,第一受益人符合我司要求,险种齐全");
				}
			}
			else if(capPayInfoVO.getPayTypCd().equals(CapPayInfoConstant.CODE_PAY_TYP_CD_2)){
				previewString.append("<b>提前放款合同审核环节提供意见</b>");
				previewString.append("</br>1、该业务为");
				if(null!=prjBscInfoVO && StringUtils.isNotEmpty(prjBscInfoVO.getPrjTypCd())){
					Map<String, String> dicGrp = this.sysDictionaryApiService.searchGroupToMapAll(CurrentThreadContext.getCurrentSysCd(), prjBscInfoVO.getBuOrgCd(), DictionaryConstant.CODE_PRJ_TYPE_CD);
					if(null!=dicGrp && dicGrp.containsKey(prjBscInfoVO.getPrjTypCd())){
						previewString.append(dicGrp.get(prjBscInfoVO.getPrjTypCd()));//项目类型
					}
				}
				if(null!=capPayInfoVO && StringUtils.isNotEmpty(capPayInfoVO.getPayTypCd())){
					if(CapPayInfoConstant.CODE_PAY_TYP_CD_1.equals(capPayInfoVO.getPayTypCd())){
						previewString.append("正常放款,");
					}else if(CapPayInfoConstant.CODE_PAY_TYP_CD_2.equals(capPayInfoVO.getPayTypCd())){
						previewString.append("提前放款,");
					}
				}
				if(null!=payOpn && BaseConstant.IS_YESNO_YES==payOpn.getIsAnchored()){
					previewString.append("车辆已挂靠;");
				}else{
					previewString.append("上个人户;");
				}
				previewString.append("</br>2、该设备为");
				if (null != prjBscInfoVO && StringUtils.isNotEmpty(prjBscInfoVO.getBizTypCd())){
					if (PrjBscInfoConstant.PRJ_BIZ_TYP_CD_ZZ.equals(prjBscInfoVO.getBizTypCd())){
						previewString.append("直接租赁业务,");
					}else if (PrjBscInfoConstant.PRJ_BIZ_TYP_CD_BZHZ.equals(prjBscInfoVO.getBizTypCd())){
						previewString.append("标准回租业务,");
					}else if (PrjBscInfoConstant.PRJ_BIZ_TYP_CD_XSHZ.equals(prjBscInfoVO.getBizTypCd())){
						previewString.append("形式回租业务,");
					}else if (PrjBscInfoConstant.PRJ_BIZ_TYP_CD_GHKD.equals(prjBscInfoVO.getBizTypCd())){
						previewString.append("工行卡贷业务,");
					}else if (PrjBscInfoConstant.PRJ_BIZ_TYP_CD_STZZ.equals(prjBscInfoVO.getBizTypCd())){
						previewString.append("视同直租业务,");
					}
				}
				previewString.append("买卖合同、融租租赁合同、三方协议");
				if (null != payOpn && BaseConstant.IS_YESNO_YES == payOpn.getIsAnchored()){
					previewString.append("、协议书、");
				}else{
					previewString.append("、");
				}
				previewString.append("交车验收单齐全;");
				previewString.append("</br>3、征信授权书、债权转让通知书已签署合规；");
				previewString.append("</br>4、合格证、发票已上传。");
				if (null != payOpn && payOpn.getIsUploadIns() == BaseConstant.IS_YESNO_NO){
					previewString.append("</br>5、保单未上传");
				}else if (null != payOpn && BaseConstant.IS_YESNO_YES == payOpn.getIsUploadIns()){
					previewString.append("</br>5、保单已上传,保险购买金额足额,第一受益人符合我司要求,险种齐全");
				}
				previewString.append("</br>6、登记证书未上传，上牌抵押环节注意核实上牌时间");
			}
		}
		return previewString.toString();
	}

	@Override
	public String getPreviewStringForHtForXny(Long id) throws BaseException {
		if(StringUtils.isEmpty(id))return "";
		StringBuffer previewString = new StringBuffer();
		AuditPayPassOpQueryCondition payOpnQC = new AuditPayPassOpQueryCondition();
		payOpnQC.setOpnTypCd(AudStandingBookConstant.AUD_PAY_OPN_TYP_CD_CONTRACT);
		payOpnQC.setId(id);
		AudPayPassOpListRequest searchRequest = new AudPayPassOpListRequest(payOpnQC);
		BaseLogUtils.info(logger, "getPreviewStringForHtForXny", "searchAudPayPassOpinionList START:"+ JSON.toJSONString(searchRequest), CurrentThreadContext.getCurrentUserName());
		ResponseData<List<AuditPayPassOpinionDTO>> responseData = auditPayPassOpinionService.searchAudPayPassOpinionList(searchRequest);
		BaseLogUtils.info(logger, "getPreviewStringForHtForXny", "searchAudPayPassOpinionList END:"+ JSON.toJSONString(responseData), CurrentThreadContext.getCurrentUserName());
		List<AuditPayPassOpinionDTO> payPassOpinionList = null;
		if (responseData != null && ResponseData.SUCCESS_CODE.equals(responseData.getCode()) && responseData.getData() != null) {
			payPassOpinionList = responseData.getData();
		}
		CapPayInfoVO capPayInfoVO = null;
		PrjBscInfoVO prjBscInfoVO = null;
		if(CollectionUtils.isNotEmpty(payPassOpinionList)){
			AuditPayPassOpinionDTO payOpn = payPassOpinionList.get(0);
			if(null!=payOpn){
				Long capPayId = payOpn.getPayId();
				if(null!=capPayId){
					capPayInfoVO = this.capPayInfoService.selectById(capPayId);
				}
				if(null!=capPayInfoVO){
					Long prjId = capPayInfoVO.getPrjId();
					prjBscInfoVO = this.prjBscInfoService.selectById(prjId);
				}
				previewString.append("1、该设备为");
				if(null!=prjBscInfoVO && StringUtils.isNotEmpty(prjBscInfoVO.getPrjTypCd())){
					Map<String, String> dicGrp = this.sysDictionaryApiService.searchGroupToMapAll(CurrentThreadContext.getCurrentSysCd(), prjBscInfoVO.getBuOrgCd(), DictionaryConstant.CODE_PRJ_TYPE_CD);
					if(null!=dicGrp && dicGrp.containsKey(prjBscInfoVO.getPrjTypCd())){
						previewString.append(dicGrp.get(prjBscInfoVO.getPrjTypCd()));//项目类型
					}
				}
				previewString.append("，融资租赁合同、所有权转让协议、协议书（用于发票变更）齐全。");
				previewString.append("</br>2、该业务单为");
				if(null!=capPayInfoVO && StringUtils.isNotEmpty(capPayInfoVO.getPayTypCd())){
					if(CapPayInfoConstant.CODE_PAY_TYP_CD_1.equals(capPayInfoVO.getPayTypCd())){
						previewString.append("正常放款");
					}else if(CapPayInfoConstant.CODE_PAY_TYP_CD_2.equals(capPayInfoVO.getPayTypCd())){
						previewString.append("提前放款");
					}
				}
				previewString.append("流程，车辆");
				if(null!=payOpn && BaseConstant.IS_YESNO_YES==payOpn.getIsAnchored()){
					//previewString.append("已");
				}else{
					previewString.append("不");
				}
				previewString.append("挂靠。");
				previewString.append("</br>3、调查报告签字页、通知书签署合规。</br>4、交车验收单、合格证已上传。");
				if(null!=payOpn && BaseConstant.IS_YESNO_YES==payOpn.getIsUploadIns()){
					previewString.append("</br>5、保单已上传，保险购买金额足额，第一受益人符合我司要求，险种齐全。");
				}else{
					previewString.append("</br>5、保单未上传。");
				}
			}
		}
		return previewString.toString();
	}
	
	@Override
	public String getPreviewStringForDyForXny(Long id) throws BaseException {
		if(StringUtils.isEmpty(id))return "";
		StringBuffer previewString = new StringBuffer();
		/*AudPayPassOpinionQueryCondition payOpnQC = new AudPayPassOpinionQueryCondition();
		payOpnQC.setOpnTypCd(AudStandingBookConstant.AUD_PAY_OPN_TYP_CD_MORTGAGE);
		payOpnQC.setId(id);
		List<AudPayPassOpinionDTO> payPassOpinionList = this.auditApiService.searchAudPayPassOpinionList(payOpnQC);
		AudPayPassOpinionDTO payOpn = null;
		if(CollectionUtils.isNotEmpty(payPassOpinionList)){
			payOpn = payPassOpinionList.get(0);
		}*/
		previewString.append("该设备已抵押给我司，登记证书、交车照片、大驾号照片已经上传");
		return previewString.toString();
	}
}
